From: Marcel Holtmann Date: Fri, 26 Jun 2009 10:43:45 +0000 (+0200) Subject: Print an error if a network already exists X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~3690 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6832034f09fbdedf9a3d95b9cdd99c14ab8819a6;p=profile%2Fivi%2Fconnman.git Print an error if a network already exists --- diff --git a/src/service.c b/src/service.c index aa89d5d..68d1358 100644 --- a/src/service.c +++ b/src/service.c @@ -1176,6 +1176,11 @@ struct connman_service *__connman_service_create_from_network(struct connman_net const char *ident, *group; char *name; + if (__connman_service_lookup_from_network(network) != NULL) { + connman_error("Service already exists"); + return NULL; + } + ident = __connman_network_get_ident(network); if (ident == NULL) return NULL;