userdb-blocking.c revision 08d6658a4e2ec8104cd1307f6baa75fdb07a24f8
45312f52ff3a3d4c137447be4c7556500c2f8bf2Timo Sirainen/* Copyright (c) 2005-2009 Dovecot authors, see the included COPYING file */
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo Sirainenstatic void user_callback(struct auth_request *request, const char *reply)
0f39a57760d93cddbce3ca43096d78e0fe2f42fdTimo Sirainen else if (strncmp(reply, "NOTFOUND\t", 9) == 0)
226259ee6fb9830dafc1a5ba1e95bf5a4345b406Timo Sirainen request->userdb_reply = auth_stream_reply_init(request->pool);
6fabfb7bbfd88d0c1de66981e52850f26067623bTimo Sirainen auth_stream_reply_import(request->userdb_reply, reply + 3);
0f39a57760d93cddbce3ca43096d78e0fe2f42fdTimo Sirainen i_error("BUG: auth-worker sent invalid user reply");
6fabfb7bbfd88d0c1de66981e52850f26067623bTimo Sirainen auth_request_userdb_callback(result, request);
e9503210d3521a6833ed62dc332fc42ffb0e7a13Timo Sirainenvoid userdb_blocking_lookup(struct auth_request *request)
226259ee6fb9830dafc1a5ba1e95bf5a4345b406Timo Sirainen reply = auth_stream_reply_init(pool_datastack_create());
226259ee6fb9830dafc1a5ba1e95bf5a4345b406Timo Sirainen auth_stream_reply_add(reply, NULL, dec2str(request->userdb->num));