Bug 760991

Summary: [abrt] synce-connector-0.15.2-4.fc16: synceconnector.py:349:signal_dccm:NameError: global name 'our_udi' is not defined
Product: [Fedora] Fedora Reporter: mkronsteiner <alphamike>
Component: synce-connectorAssignee: Andreas Bierfert <andreas.bierfert>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: andreas.bierfert, kyle, pablo.iranzo, robdale
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:6c23c466def70f31dc8d0671a951a267a8c46c60
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-14 00:53:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: smolt_data
none
fix patch
none
git patch none

Description mkronsteiner 2011-12-07 14:42:03 UTC
libreport version: 2.0.7
abrt_version:   2.0.6
cmdline:        python /usr/share/synce-connector/udev-synce-rndis
comment:        plugging in my iPaq
executable:     /usr/share/synce-connector/udev-synce-rndis
kernel:         3.1.4-1.fc16.x86_64
reason:         synceconnector.py:349:signal_dccm:NameError: global name 'our_udi' is not defined
time:           Wed 07 Dec 2011 03:08:33 PM CET
uid:            0
username:       root

smolt_data:     Text file, 2712 bytes

backtrace:
:synceconnector.py:349:signal_dccm:NameError: global name 'our_udi' is not defined
:
:Traceback (most recent call last):
:  File "/usr/share/synce-connector/udev-synce-rndis", line 61, in <module>
:    if signal_dccm(device_path,device_ip,local_ip,True) == False:
:  File "/usr/share/synce-connector/synceconnector.py", line 349, in signal_dccm
:    logger.critical("failed to signal device connect to dccm device manager %s: %s" % (our_udi, e))
:NameError: global name 'our_udi' is not defined
:
:Local variables in innermost frame:
:dccm_manager: <Interface <ProxyObject wrapping <dbus._dbus.SystemBus (system) at 0x1df4170> :1.64 /org/synce/dccm/DeviceManagerControl at 0x7f36df203fd0> implementing 'org.synce.dccm.DeviceManager.Control' at 0x1e02d50>
:local_ip: '169.254.2.2'
:device_ip: '169.254.2.1'
:dccm_log_level: '6'
:rndis: True
:device_path: '/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/net/eth0'
:rndis_text: 'True'

Comment 1 mkronsteiner 2011-12-07 14:42:06 UTC
Created attachment 541976 [details]
File: smolt_data

Comment 2 Robert Dale 2012-02-07 14:12:09 UTC
Submitted bug and suggested fix/patch at synce...

https://sourceforge.net/tracker/?func=detail&aid=3485372&group_id=30550&atid=399601

Comment 3 Robert Dale 2012-02-08 04:38:47 UTC
I've made some other changes there was well and suggested making a new release containing those fixes.

In the meantime, here's a patch.  Note that /etc/org.synce.dccm.conf has a critical permission added thus you'll want to replace it, but it's marked as noreplace in the rpm.


svn diff -r4037:4041 connector/
Index: connector/scripts/synceconnector.py.in
===================================================================
--- connector/scripts/synceconnector.py.in	(revision 4037)
+++ connector/scripts/synceconnector.py.in	(revision 4041)
@@ -345,8 +345,8 @@
 
     try:
         dccm_manager.DeviceConnected(device_path, device_ip, local_ip, rndis)
-    except:
-        logger.critical("failed to signal device connect to dccm device manager %s: %s" % (our_udi, e))
+    except Exception,e:
+        logger.critical("failed to signal device connect to dccm device manager %s: %s" % (device_path, e))
         return False
 
     return True
Index: connector/src/synce-device-manager.c
===================================================================
--- connector/src/synce-device-manager.c	(revision 4037)
+++ connector/src/synce-device-manager.c	(revision 4041)
@@ -219,8 +219,12 @@
 
   g_debug("%s: listening for device %s", G_STRFUNC, deventry->device_path);
 
-  if (deventry->rndis)
+  if (deventry->rndis) {
+  g_debug("%s: triggering connection", G_STRFUNC);
     synce_trigger_connection(deventry->device_ip);
+  } else {
+  g_debug("%s: NOT triggering connection", G_STRFUNC);
+}
 
   return TRUE;
 }
@@ -331,24 +335,41 @@
   *ret = g_ptr_array_new ();
 
   GSList *device_entry_iter = priv->devices;
-  while (device_entry_iter != NULL) {
 
+  for (; device_entry_iter; device_entry_iter = g_slist_next(device_entry_iter)) {
+
+  DeviceEntry *deventry = device_entry_iter->data;
+
+  if (!deventry) {
+    g_critical("%s: DeviceEntry was null", G_STRFUNC);
+    continue;
+  }
+
+  g_debug("%s: deventry->device_path = %s", G_STRFUNC, deventry->device_path);
+  g_debug("%s: deventry->device_ip = %s", G_STRFUNC, deventry->device_ip);
+  g_debug("%s: deventry->local_ip = %s", G_STRFUNC, deventry->local_ip);
+  g_debug("%s: deventry->rndis = %s", G_STRFUNC, (deventry->rndis ? "true" : "false"));
+  g_debug("%s: deventry->iface_pending = %s", G_STRFUNC, (deventry->iface_pending ? "true" : "false"));
+
     gchar *obj_path;
     SynceDevice *device = ((DeviceEntry*)device_entry_iter->data)->device;
-    if (device == NULL)
+    if (device == NULL) {
+      g_debug("%s: device was null", G_STRFUNC);
       /* interface is not yet ready */
       continue;
+    }
 
     g_object_get (device, "object-path", &obj_path, NULL);
-    if (obj_path == NULL)
+    if (obj_path == NULL) {
+      g_debug("%s: object path was null", G_STRFUNC);
       /* device is not yet ready */
       continue;
+    }
 
     g_debug("%s: found device %s with object path %s", G_STRFUNC, ((DeviceEntry*)device_entry_iter->data)->device_path, obj_path);
 
     g_ptr_array_add (*ret, obj_path);
 
-    device_entry_iter = g_slist_next(device_entry_iter);
   }
 
   return TRUE;

Property changes on: connector/src/synce-device-manager.c
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk/core/dccm/synce-device-manager.c:r4039

Index: connector/etc/org.synce.dccm.conf
===================================================================
--- connector/etc/org.synce.dccm.conf	(revision 4037)
+++ connector/etc/org.synce.dccm.conf	(revision 4041)
@@ -13,6 +13,7 @@
 
   <!-- Allow anyone to invoke methods on the Device and DeviceManager interfaces -->
   <policy context="default">
+    <allow send_type="method_call"/>
     <allow send_destination="org.synce.dccm"
 	   send_interface="org.synce.dccm.Device"/>

Comment 4 Robert Dale 2012-02-08 04:49:46 UTC
Created attachment 560123 [details]
fix patch

Made a patch against the 0.15.2 source tar distribution.

Comment 5 Robert Dale 2012-02-08 16:19:55 UTC
Created attachment 560307 [details]
git patch

Patch against the fedora git repo synce-connector.git.
- Added source patch
- Updated spec file

Tested locally.

Comment 6 Kyle Strickland 2012-02-23 21:30:03 UTC
Patch from attachment 560123 [details] seems to works for me.

I do have to manually replace the /etc/dbus-1/system.d/org.synce.dccm.conf file as Robert mentioned, and I have to disable the firewall (at least until I figure out how best to configure the firewall), but after that it works.

Thanks Robert!

Comment 7 Pablo Iranzo Gómez 2012-08-29 10:51:37 UTC
Is this going to hit F17 too?

Thanks
Pablo

Comment 8 Fedora End Of Life 2013-01-16 22:21:08 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Fedora End Of Life 2013-02-14 00:53:55 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.