* importPath() -> importPaths(). Because of buffering of the input
stream it's now necessary for the daemon to process the entire sequence of exported paths, rather than letting the client do it.
This commit is contained in:
		
							parent
							
								
									8d3dfa2c17
								
							
						
					
					
						commit
						273b288a7e
					
				
					 10 changed files with 75 additions and 57 deletions
				
			
		|  | @ -163,13 +163,16 @@ void writeString(const string & s, Sink & sink) | |||
| } | ||||
| 
 | ||||
| 
 | ||||
| void writeStringSet(const StringSet & ss, Sink & sink) | ||||
| template<class T> void writeStrings(const T & ss, Sink & sink) | ||||
| { | ||||
|     writeInt(ss.size(), sink); | ||||
|     for (StringSet::iterator i = ss.begin(); i != ss.end(); ++i) | ||||
|     foreach (typename T::const_iterator, i, ss) | ||||
|         writeString(*i, sink); | ||||
| } | ||||
| 
 | ||||
| template void writeStrings(const Paths & ss, Sink & sink); | ||||
| template void writeStrings(const PathSet & ss, Sink & sink); | ||||
| 
 | ||||
| 
 | ||||
| void readPadding(size_t len, Source & source) | ||||
| { | ||||
|  | @ -234,14 +237,17 @@ string readString(Source & source) | |||
| } | ||||
| 
 | ||||
|   | ||||
| StringSet readStringSet(Source & source) | ||||
| template<class T> T readStrings(Source & source) | ||||
| { | ||||
|     unsigned int count = readInt(source); | ||||
|     StringSet ss; | ||||
|     T ss; | ||||
|     while (count--) | ||||
|         ss.insert(readString(source)); | ||||
|         ss.insert(ss.end(), readString(source)); | ||||
|     return ss; | ||||
| } | ||||
| 
 | ||||
| template Paths readStrings(Source & source); | ||||
| template PathSet readStrings(Source & source); | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue