[Phonehome-commits] r41 - in trunk: client/src frontend/src
pamadio at garage.maemo.org
pamadio at garage.maemo.org
Sat Oct 18 13:59:01 EEST 2008
Author: pamadio
Date: 2008-10-18 13:59:00 +0300 (Sat, 18 Oct 2008)
New Revision: 41
Modified:
trunk/client/src/dsk_mgr.c
trunk/frontend/src/phonehome-gui
Log:
misc fixes
Modified: trunk/client/src/dsk_mgr.c
===================================================================
--- trunk/client/src/dsk_mgr.c 2008-10-18 05:20:50 UTC (rev 40)
+++ trunk/client/src/dsk_mgr.c 2008-10-18 10:59:00 UTC (rev 41)
@@ -50,15 +50,18 @@
#define DAEMON_NAME "[dsk_mgr]"
#define DEFAULT_XMLRPC_SERVER "http://192.168.0.13/rpc/myserver.php"
+#define TMP_POSITIONS_FILE "/var/tmp/positions.txt"
GSList* gps_positions = NULL;
gboolean connection_flag=FALSE;
+gboolean cam_in_action_flag=FALSE;
GstElement *pipeline;
guint buffer_cb_id;
gchar* xmlrpc_id=NULL;
gchar* xmlrpc_password=NULL;
gchar* xmlrpc_server=NULL;
+
typedef struct {
double lat;
double lon;
@@ -227,7 +230,7 @@
FILE * fh;
GSList* new_head = gps_positions;
- fh=fopen( "/tmp/positions.txt", "a");
+ fh=fopen(TMP_POSITIONS_FILE, "a");
if(fh==NULL){
g_print("Problem appending to a file\n");
return;
@@ -249,7 +252,7 @@
FILE * fh;
char line [128];
- fh=fopen( "/tmp/positions.txt", "r");
+ fh=fopen(TMP_POSITIONS_FILE, "r");
if(fh==NULL){
g_print("Problem reading file\n");
return;
@@ -275,7 +278,7 @@
gps_positions=g_slist_prepend(gps_positions,(gpointer) cur_info);
}
fclose(fh);
- remove("/tmp/positions.txt");
+ remove(TMP_POSITIONS_FILE);
}
@@ -366,11 +369,18 @@
g_print("Stopping cam\n");
gst_element_set_state(pipeline, GST_STATE_NULL);
gst_object_unref(GST_OBJECT (pipeline));
+ cam_in_action_flag=FALSE;
return FALSE;
}
void take_photo(){
g_print("Trying to get a pic\n");
+ if(cam_in_action_flag==TRUE) {
+ g_print("Cam already in action\n");
+ return;
+ }
+
+ cam_in_action_flag=TRUE;
create_pipe();
gst_element_set_state(pipeline, GST_STATE_PLAYING);
GstElement *image_sink;
Modified: trunk/frontend/src/phonehome-gui
===================================================================
--- trunk/frontend/src/phonehome-gui 2008-10-18 05:20:50 UTC (rev 40)
+++ trunk/frontend/src/phonehome-gui 2008-10-18 10:59:00 UTC (rev 41)
@@ -70,7 +70,7 @@
if(self.gconf_default.get_string(self.gconf_root+"/password")):
self.password_entry.set_text(self.gconf_default.get_string(self.gconf_root+"/password"))
- if(self.gconf_default.get_string(self.gconf_root+"/id")):
+ if(self.gconf_default.get_string(self.gconf_root+"/server")):
self.server_entry.set_text(self.gconf_default.get_string(self.gconf_root+"/server"))
More information about the Phonehome-commits
mailing list