struct db_record *connections_fetch_entry(TALLOC_CTX *mem_ctx, connection_struct *conn, const char *name) { struct connections_key ckey; TDB_DATA key; ZERO_STRUCT(ckey); ckey.pid = procid_self(); ckey.cnum = conn ? conn->cnum : -1; strlcpy(ckey.name, name, sizeof(ckey.name)); key.dsize = sizeof(ckey); key.dptr = (uint8 *)&ckey; return connections_fetch_record(mem_ctx, key); }
struct db_record *connections_fetch_entry(TALLOC_CTX *mem_ctx, connection_struct *conn, const char *name) { struct connections_key ckey; TDB_DATA key; ZERO_STRUCT(ckey); ckey.pid = messaging_server_id(conn->sconn->msg_ctx); ckey.cnum = conn->cnum; strlcpy(ckey.name, name, sizeof(ckey.name)); key.dsize = sizeof(ckey); key.dptr = (uint8 *)&ckey; return connections_fetch_record(mem_ctx, key); }