summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4bab2b4)
raw | patch | inline | side by side (parent: 4bab2b4)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 14 Jan 2015 20:56:22 +0000 (21:56 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 14 Jan 2015 20:56:22 +0000 (21:56 +0100) |
This is just to avoid weird error messages if setting up the connection
failed.
failed.
src/frontend/connection.c | patch | blob | history |
index f35f7b39c82a8278f47137e65810163094c33044..c35d2d213bd5cee21e9d0e5d3a069f17bce45736 100644 (file)
return -1;
}
+ /* update the object name */
+ snprintf(obj->name + strlen(CONN_FD_PREFIX),
+ strlen(CONN_FD_PLACEHOLDER), "%i", conn->fd);
+
/* defaults */
conn->read = conn_read;
conn->write = conn_write;
conn->cmd = SDB_CONNECTION_IDLE;
conn->cmd_len = 0;
conn->skip_len = 0;
-
- /* update the object name */
- snprintf(obj->name + strlen(CONN_FD_PREFIX),
- strlen(CONN_FD_PLACEHOLDER), "%i", conn->fd);
return 0;
} /* connection_init */