[zaptel-commits] tzafrir: branch tzafrir/syncing r1479 - /team/tzafrir/syncing/

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Sun Sep 24 17:04:15 MST 2006


Author: tzafrir
Date: Sun Sep 24 19:04:14 2006
New Revision: 1479

URL: http://svn.digium.com/view/zaptel?rev=1479&view=rev
Log:
Another small interface addition: Allow a span to check if it is sync master.

Modified:
    team/tzafrir/syncing/zaptel.c
    team/tzafrir/syncing/zaptel.h

Modified: team/tzafrir/syncing/zaptel.c
URL: http://svn.digium.com/view/zaptel/team/tzafrir/syncing/zaptel.c?rev=1479&r1=1478&r2=1479&view=diff
==============================================================================
--- team/tzafrir/syncing/zaptel.c (original)
+++ team/tzafrir/syncing/zaptel.c Sun Sep 24 19:04:14 2006
@@ -6497,6 +6497,11 @@
 	return zt_chan_poll(file, wait_table, unit);
 }
 
+int zt_is_sync_master(struct zt_span *span)
+{
+       return (master == span);
+}
+		
 static void __zt_transmit_chunk(struct zt_chan *chan, unsigned char *buf)
 {
 	unsigned char silly[ZT_CHUNKSIZE];

Modified: team/tzafrir/syncing/zaptel.h
URL: http://svn.digium.com/view/zaptel/team/tzafrir/syncing/zaptel.h?rev=1479&r1=1478&r2=1479&view=diff
==============================================================================
--- team/tzafrir/syncing/zaptel.h (original)
+++ team/tzafrir/syncing/zaptel.h Sun Sep 24 19:04:14 2006
@@ -1481,6 +1481,9 @@
 	struct zt_dynamic_driver *next;
 };
 
+/* Returns 1 if span is the current sync master, 0 otherwise. No locking.*/
+int zt_is_sync_master(struct zt_span *span);
+
 /* Receive a dynamic span message */
 void zt_dynamic_receive(struct zt_span *span, unsigned char *msg, int msglen);
 



More information about the zaptel-commits mailing list