Browse Source

refactor: Add commit function

Girish Ramakrishnan 8 years ago
parent
commit
175684fad8
2 changed files with 6 additions and 0 deletions
  1. 5 0
      qavahiservicepublisher.cpp
  2. 1 0
      qavahiservicepublisher.h

+ 5 - 0
qavahiservicepublisher.cpp

@@ -121,7 +121,12 @@ void QAvahiServicePublisher::doPublish(AvahiClient *client)
             return;
         }
     }
+    
+    commit();
+}
 
+void QAvahiServicePublisher::commit()
+{
     m_error = avahi_entry_group_commit(m_group);
     if (m_error < 0) {
         QAPDEBUG("Failed to commit service group : %s", avahi_strerror(m_error));

+ 1 - 0
qavahiservicepublisher.h

@@ -63,6 +63,7 @@ private:
     void initialize();
     void uninitialize();
     void doPublish(AvahiClient *client);
+    void commit();
 
     QString m_serviceName;
     AvahiClient *m_client;