diff options
Diffstat (limited to 'network/manager.c')
-rw-r--r-- | network/manager.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/network/manager.c b/network/manager.c index 5c619d94..52e7dd6a 100644 --- a/network/manager.c +++ b/network/manager.c @@ -264,8 +264,12 @@ static void pan_record_reply(DBusPendingCall *call, void *data) d = sdp_data_get(rec, SDP_ATTR_SVCNAME_PRIMARY); if (d) { - snprintf(name + len, MAX_NAME_SIZE - len, "(%.*s)", - d->unitSize, d->val.str); + if (len) + snprintf(name + len, MAX_NAME_SIZE - len, " (%.*s)", + d->unitSize, d->val.str); + else + snprintf(name, MAX_NAME_SIZE, "%.*s", + d->unitSize, d->val.str); } /* Extract service description from record */ |