comparison shterm.js @ 12:9e1d83f50c9e

shterm.js: Add some debugging messages.
author John "Elwin" Edwards <elwin@sdf.org>
date Sun, 13 May 2012 08:47:35 -0700
parents 481dcee353c9
children bf7c26d0b66d
comparison
equal deleted inserted replaced
11:481dcee353c9 12:9e1d83f50c9e
130 } 130 }
131 else if (response.t == "n") 131 else if (response.t == "n")
132 ajaxstate.gotnothing(); 132 ajaxstate.gotnothing();
133 else if (response.t == "d") { 133 else if (response.t == "d") {
134 writeData(response.d); 134 writeData(response.d);
135 debug(1, "Got packet " + response.n);
135 ajaxstate.gotdata(); 136 ajaxstate.gotdata();
136 } 137 }
137 return; 138 return;
138 } 139 }
139 }; 140 };
157 else if (response.t != "d") 158 else if (response.t != "d")
158 return; 159 return;
159 /* It is a data message */ 160 /* It is a data message */
160 if (response.d) { 161 if (response.d) {
161 writeData(response.d); 162 writeData(response.d);
163 debug(1, "Got packet " + response.n);
162 } 164 }
163 ajaxstate.posted(); 165 ajaxstate.posted();
164 return; 166 return;
165 } 167 }
166 } 168 }