From: Ben Pfaff Date: Fri, 10 Oct 2008 16:56:13 +0000 (-0700) Subject: Fix inaccurate log message. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7da8505f29e73083d0ce3ddf87ddcbc0c7e4454;p=openvswitch Fix inaccurate log message. --- diff --git a/secchan/secchan.c b/secchan/secchan.c index 2447884c..a937d097 100644 --- a/secchan/secchan.c +++ b/secchan/secchan.c @@ -720,11 +720,13 @@ call_local_port_changed_callbacks(struct port_watcher *pw) name[0] = '\0'; } if (strcmp(pw->local_port_name, name)) { - VLOG_WARN("Identified data path local port as \"%s\".", name); - } else { - VLOG_WARN("Data path has no local port."); + if (name[0]) { + VLOG_WARN("Identified data path local port as \"%s\".", name); + } else { + VLOG_WARN("Data path has no local port."); + } + strcpy(pw->local_port_name, name); } - strcpy(pw->local_port_name, name); /* Invoke callbacks. */ for (i = 0; i < pw->n_local_cbs; i++) {